package com.example.cdctest.mapper;


import com.example.cdctest.pojo.Question;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface QuestionMapper {
    List<Question> randomTest() ;

    int deleteByPrimaryKey(Integer id);

    int insert(Question record);

    int insertSelective(Question record);

    Question selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Question record);

    int updateByPrimaryKey(Question record);

    List<Question> selectList(@Param("subject") String subject, @Param("questionTypeId") Integer questionTypeId);

    Integer selectQuestionCount(String subject, Integer questionTypeId);

    //通过问题的id,重新编辑的问题标题,重新编辑好的问题解析,提交到数据库修改信息参数
    void updateQuestionById(Question object);

    void updateQuestionDelById(Integer id);

    //批量删除问题
    void updateBatchQuestion(String ids);

    List<Question> selectQuestionByCategoryid(Integer id);

    List<Question> selectQuestionByQuestionTypeid(Integer id);

    List<Question> selectAllQuestion();

}